const { app, ipcMain, BrowserWindow } = require('electron');
const path = require('path')

let videoCall 

const createVideoCallWindow = () => {
    videoCall = new BrowserWindow({
        width: 375,
        height: 663,
        autoHideMenuBar: true,
        resizable: false,
        frame: false,
        webPreferences: {
           preload: path.join(__dirname, '../preload/preload.js') 
        }
    })

    videoCall.loadURL('http://localhost:5173/videoCall')

    videoCall.on('closed', () => {
        videoCall = null
    })
}

module.exports = {
    createVideoCallWindow
}   